<nav class="navbar navbar-default">
	<div class="container">
	    <!-- Brand and toggle get grouped for better mobile display -->
	    <div class="navbar-header">
		    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbarCollapse1" aria-expanded="false">
		        <span class="sr-only">Toggle navigation</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		    </button>
		    <a class="navbar-brand" href="/">News 新闻</a>
	    </div>
	
	    <!-- Collect the nav links, forms, and other content for toggling -->
	    <div class="collapse navbar-collapse" id="navbarCollapse1">
		    <form class="navbar-form navbar-left" id="searchForm">
		        <div class="form-group">
		            <input type="text" name="search" id="search" class="form-control" placeholder="Search">
			        <ul class="list-group" id="searchList">
					</ul>
		        </div>
		        <button type="submit" class="btn btn-default">搜索</button>
		    </form>
		    <ul class="nav navbar-nav navbar-right">
		    	
		    	<% if(!loginbean) { %>
		        <li><button type="button" class="btn btn-default navbar-btn" data-toggle="modal" data-target="#modal" data-value="login">登录</button></li>
		        <li><button type="button" class="btn btn-default navbar-btn" data-toggle="modal" data-target="#modal" data-value="register">注册</button></li>	
		    	<% }else { %>
		        <li><img id="smallUserPicture" src="<%= loginbean.userPicture %>" class="img-circle user-img" alt="Responsive image" /></li>
		        <li class="dropdown">
		          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><%= loginbean.name %><span class="caret"></span></a>
		          <ul class="dropdown-menu">
		            <li><a href="/users"><span class="glyphicon glyphicon-home span-info" aria-hidden="true"></span>个人首页</a></li>
		            <li role="separator" class="divider"></li>
		            <% if(loginbean.status == '管理员' || loginbean.status == '超级管理员') { %>
		            <li><a href="/admin"><span class="glyphicon glyphicon-tasks span-info" aria-hidden="true"></span>管理界面</a></li>
		            <li role="separator" class="divider"></li>
		            <% } %>
		            <li><a href="/loginOut"><span class="glyphicon glyphicon-log-out span-info" aria-hidden="true"></span>退出</a></li>
		          </ul>
		        </li>
		        <% } %>
		    </ul>
	    </div><!-- /.navbar-collapse -->
	</div><!-- /.container -->
</nav>